---
title: Create custom inference models
description: How to build a custom inference model in the Custom Model Workshop.

---

# Create custom inference models {: #create-custom-inference-models }

Custom inference models are user-created, pre-trained models that you can upload to DataRobot (as a collection of files) via the **Custom Model Workshop**. You can then upload a model artifact to create, test, and deploy custom inference models to DataRobot's centralized deployment hub.

You can assemble custom inference models in either of the following ways:

* Create a custom model _without_ providing the model requirements and `start_server.sh` file on the **Assemble** tab. This type of custom model _must_ use a drop-in environment. Drop-in environments contain the requirements and `start_server.sh` file used by the model. They are [provided by DataRobot](drop-in-environments) in the Custom Model Workshop. You can also [create your own](custom-environments#create-a-custom-environment) drop-in custom environment.

* Create a custom model _with_ the model requirements and `start_server.sh` file on the **Assemble** tab. This type of custom model can be paired with a [custom](custom-environments#create-a-custom-environment) or [drop-in](drop-in-environments) environment.

Be sure to review the guidelines for [assembling a custom model](custom-model-assembly/index) before proceeding. If any files overlap between the custom model and the environment folders, the model's files will take priority.

!!! note
     Once a custom model's file contents are assembled, you can [test the contents locally](custom-local-test) for development purposes before uploading it to DataRobot. After you create a custom model in the Workshop, you can run a [testing suite](custom-model-test) from the **Assemble** tab.

##  Create a new custom model {: #create-a-new-custom-model }

1. To create a custom model, navigate to **Model Registry** > **Custom Model Workshop** and select the **Models** tab. This tab lists the models you have created. Click **Add new model**.

	![](images/cmodel-1.png)

2. In the **Add Custom Inference Model** window, enter the fields described in the table below:

    ![](images/cmodel-2.png)

    |   | Element | Description |
    |---|---|---|
    | ![](images/icon-1.png) | Model name | Name the custom model.|
    | ![](images/icon-2.png) | Target type / Target name | Select the target type ([binary classification](glossary/index#classification), [regression](glossary/index#regression), [multiclass](glossary/index#multiclass), [text generation](generative-model-monitoring) (_premium feature_), [anomaly detection](#anomaly-detection), or [unstructured](unstructured-custom-models)) and enter the name of the target feature. |
    | ![](images/icon-3.png) | Positive class label / Negative class label | These fields only display for binary classification models. Specify the value to be used as the positive class label and the value to be used as the negative class label. <br> For a multiclass classification model, these fields are replaced by a field to enter or upload the target classes in `.csv` or `.txt` format. |

3. Click **Show Optional Fields** and, if necessary, enter a prediction threshold, the coding language used to build the model, and a description.

   	![](images/cmodel-3.png)

4. After completing the fields, click **Add Custom Model**.

5. In the **Assemble** tab, under **Model Environment** on the right, select a model environment by clicking the **Base Environment** dropdown menu on the right and selecting an environment. The model environment is used for [testing](custom-model-test) and [deploying](deploy-custom-inf-model) the custom model.

    ![](images/cmodel-assemble-add-env.png)

    !!! note
        The **Base Environment** pulldown menu includes [drop-in model environments](drop-in-environments), if any exist, as well as [custom environments](custom-environments#create-a-custom-environment) that you can create.

6. Under **Model** on the left, add content by dragging and dropping files or browsing. Alternatively, select a [remote integrated repository](custom-model-repos).

    ![](images/cmodel-assemble-add-files.png)

    If you click **Browse local file**, you have the option of adding a **Local Folder**. The local folder is for dependent files and additional assets required by your model, not the model itself. Even if the model file is included in the folder, it will not be accessible to DataRobot unless the file exists at the root level. The root file can then point to the dependencies in the folder.

	!!! note
	    You must also upload the model requirements and a `start_server.sh` file to your model's folder unless you are pairing the model with a [drop-in environment](drop-in-environments).

### Anomaly detection {: #anomaly-detection }

You can create custom inference models that support anomaly detection problems. If you choose to build one, reference the [DRUM template](https://github.com/datarobot/datarobot-user-models/tree/master/model_templates/python3_sklearn_anomaly){ target=_blank }. ({% include 'includes/github-sign-in.md' %}) When deploying custom inference anomaly detection models, note that the following functionality is not supported:

* Data drift
* Accuracy and association IDs
* Challenger models
* Humility rules
* Prediction intervals
